$(function(){ 	
	var date = new Date();
	var datetime_params = {
		showAnim:"clip",    
	    changeMonth: true,
	    changeYear: true,         
	    constrainInput: true,
	    showOptions: { direction: "up" },
		showSecond: true,	
		hour: date.getHours(),
		minute:date.getMinutes(),
		second:date.getSeconds(),	  
		// timeOnly:true,
		timeFormat: 'HH:mm:ss',
		dateFormat: "yy-mm-dd",		
		showTimepicker: true,
		currentText: '现在',
		closeText: '关闭',
		hourText:'&nbsp;&nbsp;&nbsp;时',			
		minuteText:'&nbsp;&nbsp;&nbsp;分',		
		secondText:'&nbsp;&nbsp;&nbsp;秒',
		timeText:'时间',
		timeOnlyTitle:'选择时间',
		prevText: '<上一个',
		nextText: '下一个>',		
		monthNamesShort: ['一月份','二月份','三月份','四月份','五月份','六月份','七月份','八月份','九月份','十月份','十一月','十二月'],
		dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
		firstDay: 1,			
	};	
	$('.datetime_timepicker').datetimepicker(datetime_params);	
	$('.datetime_timepicker').change(function(){
	    	var that = $(this);    	
	    	var datetime = that.val().split(' ');
	    	var dateArr = datetime[0].split('-');
	    	var timeArr = datetime[1].split(':');	    	
	    	var date = new Date();  
	    	date.setFullYear(dateArr[0],dateArr[1]-1,dateArr[2]);
	    	date.setHours(timeArr[0]);
	    	date.setMinutes(timeArr[1]);
	    	date.setSeconds(timeArr[2]);	    		    	
	    	var time = parseInt(date.getTime()/1000);	    
	    	that.next().val(time);    	
	});
});